<?php
('Access-Control-Allow-Origin：*');
include("../config/mysql.php");
$id = $_POST["id"];
$username = $_POST["username"];
$userpwd = $_POST["userpwd"];
$tname = $_POST["tname"];
$tphone = $_POST["tphone"];
$yhc = $_POST["yhc"];
$idCard = $_POST["idCard"];
$scale = $_POST["scale"];
$salary = $_POST["salary"];
$company_id = $_POST["company_id"];


$db = new mysql();

$sql = "update teachers set username='{$username}',userpwd='{$userpwd}',tname='{$tname}',tphone='{$tphone}',yhc='{$yhc}',idCard='{$idCard}',scale='{$scale}',salary='{$salary}',company_id = {$company_id} where id = {$id}";

echo $db->Query($sql);
$db->close();
